<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>--%>
<%
    String basePath = "http://192.168.1.120:8050/empMaven/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <title>添加员工</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
</head>
<body>
<%--上级领导：${mgrs}--%>
<form action="emp/addEmp" method="post" enctype="multipart/form-data">
    员工编号:<input name="empNo" type="text"><p/>
    员工姓名:<input name="ename" type="text"><p/>
    员工头像:<input name="userImg" type="file"><p/>
    员工岗位:<input name="job" type="text"><p/>
    上级领导:<select name="mgr">
    <option value="">--请选择--</option>
    <c:forEach items="${mgrs}" var="e">
        <option value="${e.empNo}">${e.ename}</option>
    </c:forEach>
</select><p/>
    入职日期:<input name="hireDate" type="date"><p/>
    员工工资:<input name="sal" type="text"><p/>
    员工奖金:<input name="comm" type="text"><p/>
    员工部门:<select name="dept.deptNo">
    <option value="">--请选择--</option>
    <c:forEach items="${depts}" var="d">
        <option value="${d.deptNo}">${d.deptNo}${d.dname}</option>
    </c:forEach>
</select><p/>
    <input type="submit" value="确定添加">
    <input type="reset" value="重置表单">
</form>
</body>
</html>